package com.zb.vo;

import com.zb.entity.ZjCustomer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.beans.BeanUtils;

import java.math.BigDecimal;
import java.util.Date;

/**
 * @Author WEN
 * @Date 2023/8/12 0012
 **/
@Data
@ApiModel("企业信息对象")
public class CustomerInfoVo {
    @ApiModelProperty(value = "商家代码")
    private String code;

    @ApiModelProperty(value = "商家全称")
    private String fullName;

    @ApiModelProperty(value = "商家简称")
    private String abbrevia;

    @ApiModelProperty(value = "状态：1-待审核，2-使用中，3-冻结，4-已过期")
    private Integer status;

    @ApiModelProperty(value = "人员名称")
    private String username;

    @ApiModelProperty(value = "手机号")
    private String phone;

    @ApiModelProperty(value = "联系电话")
    private String telephone;

    @ApiModelProperty(value = "传真")
    private String fax;

    @ApiModelProperty(value = "地址-省")
    private String province;

    @ApiModelProperty(value = "地址-市")
    private String city;

    @ApiModelProperty(value = "地址-县/区")
    private String area;

    @ApiModelProperty(value = "地址-镇")
    private String town;

    @ApiModelProperty(value = "详细地址")
    private String address;

    @ApiModelProperty(value = "企业附件存储编码")
    private String annexCode;

    @ApiModelProperty(value = "企业视频存储编码")
    private String videoCode;

    @ApiModelProperty(value = "开通时间")
    private Date openTime;

    @ApiModelProperty(value = "到期时间")
    private Date endTime;

    @ApiModelProperty(value = "注册时间")
    private Date createTime;

    @ApiModelProperty(value = "账户余额")
    private BigDecimal amountBalance;

    @ApiModelProperty(value = "短信数量")
    private Integer smsBalance;

    @ApiModelProperty(value = "版本名称")
    private String version;

    @ApiModelProperty(value = "用户数")
    private Integer users;

    public static CustomerInfoVo beanToVo(ZjCustomer customer) {
        CustomerInfoVo vo = new CustomerInfoVo();
        BeanUtils.copyProperties(customer, vo);
        vo.setCreateTime(customer.getGmtCreate());
        return vo;
    }

}
